﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

namespace MentorBackEnd.Model
{
    public class UserProfile
    {
        private int _UserProfileID;
        public int UserProfileID
        {
          get { return _UserProfileID; }
          set { _UserProfileID = value; }
        }

        private int _MeMaUserID;
        public int MeMaUserID
        {
          get { return _MeMaUserID; }
          set { _MeMaUserID = value; }
        }

        private byte[] _Picture;

        public byte[] Picture
        {
            get { return _Picture; }
            set { _Picture = value; }
        }

        private EnumTypes.MentorStatusType _MentorStatusTypeID;
        public EnumTypes.MentorStatusType MentorStatusType
        {
          get { return _MentorStatusTypeID; }
          set { _MentorStatusTypeID = value; }
        }

        private int _MentorRating;
        public int MentorRating
        {
          get { return _MentorRating; }
          set { _MentorRating = value; }
        }

        private string _LinkedInLink;
        public string LinkedInLink
        {
          get { return _LinkedInLink; }
          set { _LinkedInLink = value; }
        }

        private string _FacebookLink;
        public string FacebookLink
        {
          get { return _FacebookLink; }
          set { _FacebookLink = value; }
        } 
        private string _TwitterHandle;
        public string TwitterHandle
        {
          get { return _TwitterHandle; }
          set { _TwitterHandle = value; }
        }

        private string _PersonalWebsite;
        public string PersonalWebsite
        {
          get { return _PersonalWebsite; }
          set { _PersonalWebsite = value; }
        } 

        private string _Summary;
        public string Summary
        {
          get { return _Summary; }
          set { _Summary = value; }
        } 

        public UserProfile() { }

        public UserProfile(IDataReader reader) 
        {
             if (reader == null) return;

             MeMaUserID = (int)reader["MeMaUserID"];
             UserProfileID = (int)reader["UserProfileID"];
             Picture = reader["Picture"] != System.DBNull.Value ? (byte[])reader["Picture"] : null;
             MentorStatusType = (EnumTypes.MentorStatusType)reader["MentorStatusTypeID"];
             MentorRating = (int)reader["MentorRating"];
             LinkedInLink = reader["LinkedInLink"] != System.DBNull.Value ? (string)reader["LinkedInLink"] : null;
             FacebookLink = reader["FacebookLink"] != System.DBNull.Value ? (string)reader["FacebookLink"] : null;
             TwitterHandle = reader["TwitterHandle"] != System.DBNull.Value ? (string)reader["TwitterHandle"] : null;
             PersonalWebsite = reader["PersonalWebsite"] != System.DBNull.Value ? (string)reader["PersonalWebsite"] : null;
             Summary = reader["Summary"] != System.DBNull.Value ? (string)reader["Summary"] : null;
        }







              
        }
    }
